import sys
import os
from urllib.parse import urlencode

BASE_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(BASE_PATH)

# 定义日志文件路径
LOG_PATH = os.path.join(BASE_PATH, "log")
if not os.path.exists(LOG_PATH):
    os.mkdir(LOG_PATH)


class BDP_URL_Utils():

    def __init__(self):
        pass

    def urlencode(self, payload):
        '''
        对字典进行url编码
        '''
        return urlencode(payload)


bdp_url_utils = BDP_URL_Utils()

# if __name__ == '__main__':
#
#     bdp_url_utils = BDP_URL_Utils()
#
#     sheet_names_list = ["sheet1"]
#     excel_id = "999998"
#     payload = {
#         "excel_id": excel_id,
#         "sheet_names":sheet_names_list
#         # "row_offsets":[row_offsets],
#         # "udt":udt,
#         # "_t":_t,
#         # "_xsrf":_xsrf
#     }
#
#     res = bdp_url_utils.urlencode(payload)
#     print(res)